package com.adcc.loadsheet.monitor.entity;

import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;

/**
 * 监控日志实体
 */
public class ServerLog extends BaseEntity{

    // ID
    private Long id;

    // 服务名称
    private String name;

    // 日志类型
    private LogType type;

    // 日志内容
    private String content;

    // 创建时间
    private String createTime;

    /**
     * 构造函数
     */
    public ServerLog(){

    }

    /**
     * 构造函数
     * @param name
     * @param type
     * @param content
     */
    public ServerLog(String name, LogType type, String content){
        this.name = name;
        this.type = type;
        this.content = content;
        this.createTime = DateTime.now(DateTimeZone.UTC).toString("yyyy-MM-dd HH:mm:ss");
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public LogType getType() {
        return type;
    }

    public void setType(LogType type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toXML() throws Exception {
        return null;
    }

    @Override
    public String toJSON() throws Exception {
        return null;
    }
}
